Posts

Showing posts with the label Entity - relationship diagram

Design an E-R diagram for keeping track of the exploits of your favorite sports team. You should store the matches played, the scores in each match, the players in each match and individual player statistics for each match. Summary statistics should be modelled as derived attributes

Image
 

Consider a database used to record the marks that students get in different exams of different course offerings. (a) Construct an E-R diagram that models exams as entities, and uses a ternary relationship, for the above database. (b) Construct an alternative E-R diagram that uses only a binary relationship between students and course-offerings. Make sure that only one relationship exists between a particular student and course-offering pair, yet you can represent the marks that a student gets in different exams of a course offering.

Image
  (a) (b)

A university registrar’s office maintains data about the following entities: (a) courses, including number, title, credits, syllabus, and prerequisites; (b) course offerings, including course number, year, semester, section number, instructor(s), timings, and classroom; (c) students, including student-id, name, and program; and (d) instructors, including identification number, name, department, and title. Further, the enrolment of students in courses and grades awarded to students in each course they are enrolled for must be appropriately modelled. Construct an E-R diagram for the registrar’s office.

Image
 

Draw the E-R diagram which models an online bookstore.

Image
 

Extend the E-R diagram for keeping track of the exploits of your favorite sports team to track the same information for all teams in a league.

Image

Design an E-R diagram for keeping track of the exploits of your favourite sports team. You should store the matches played, the scores in each match, the players in each match and individual player statistics for each match. Summary statistics should be modelled as derived attributes.

Image
 

Consider a database used to record the marks that students get in different exams of different course offerings.

Image
a. Construct an E-R diagram that models exams as entities, and uses a ternary relationship, for the above database.  b. Construct an alternative E-R diagram that uses only a binary relationship between students and course-offerings. Make sure that only one relationship exists between a particular student and course-offering pair, yet you can represent the marks that a student gets in different exams of a course offering. (a) (b)

A university registrar’s office maintains data about the following entities: (a) courses, including number, title, credits, syllabus, and prerequisites; (b) course offerings, including course number, year, semester, section number, instructor(s), timings, and classroom; (c) students, including student-id, name, and program; and (d) instructors, including identification number, name, department, and title. Further, the enrolment of students in courses and grades awarded to students in each course they are enrolled for must be appropriately modelled. Construct an E-R diagram for the registrar’s office. Document all assumptions that you make about the mapping constraints.

Image

Construct an E-R diagram for a hospital with a set of patients and a set of medical doctors. Associate with each patient a log of the various tests and examinations conducted.

Image
 

Construct an E-R diagram for a car-insurance company whose customers own one or more cars each. Each car has associated with it zero to any number of recorded accidents.

Image
 

E - R Diagram

Image
The E – R Diagram consists of the following major components: Rectangles : represent entity sets  Ellipses : represent attributes Diamonds : represent relationship sets Lines : links attributes to entity sets and vice versa Double ellipses : represents multivalued attributes Dashed ellipses : represents derived attributes Double lines : represents total participation of an entity in a relationship set Double rectangles : represents weak entity sets Figure – 1: An illustration of E – R diagram corresponding to customers and loans Figure – 2 depicts two entity sets, customer and loans , related through relationship set borrower. The attributes associated with customer are customer_id, customer_name, customer_munber, customer_address, customer_pincode, customer_city .  The attributes associated with loan are loan_number, loan_amount . The customer_id and loan_number are primary keys. The relationship set borrower may have one-to-one, one-to-many, many-to-one, many-to-man